package com.ims.service.impl;

import com.b2c.common.third.thymeleaf.PagingResponse;
import com.ims.entity.LiveDataReportEntity;
import com.ims.entity.vo.StatisticsDataVo;
import com.ims.repository.LiveDataReportRepository;
import com.ims.service.LiveDataReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LiveDataReportServiceImpl implements LiveDataReportService {
    @Autowired
    private LiveDataReportRepository repository;

    @Override
    public Integer add(LiveDataReportEntity entity) {
        return repository.add(entity);
    }

    @Override
    public void edit(LiveDataReportEntity entity) {
        repository.edit(entity);
    }

    @Override
    public LiveDataReportEntity getById(Integer id) {
        return repository.getById(id);
    }

    @Override
    public PagingResponse<LiveDataReportEntity> getList(int pageIndex, int pageSize, Integer mediaAccountId) {
        return repository.getList(pageIndex,pageSize,mediaAccountId);
    }

    @Override
    public StatisticsDataVo getMediaData(Integer mediaAccountId) {
        return repository.getMediaData(mediaAccountId);
    }

    @Override
    public StatisticsDataVo getLiveData(Integer accountId) {
        return repository.getLiveData(accountId);
    }
}
